<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>练习background-origin</title>
  <!-- 
    background-origin
    图片从那个位置定位开始展示 默认从内边距开始展示
    三个参数 
        1. content-box 从内容开始展示
        2. padding-box 从内边距开始展示
        3. border-box 从外边距开始展示
   -->
  <style>
    div{
      background: url('../../img/a.png') no-repeat;
      width: 100px;
      height: 100px;
      padding: 40px;
      border: 50px dashed #ccc;
      display: inline-block;
      margin-right: 20px;
    }
    .bgImg1 {
      background-origin: content-box;
    }
    .bgImg2 {
      background-origin: padding-box;
    }
    .bgImg3 {
      background-origin: border-box;
    }
  </style>
</head>
<body>
  <div></div>
  <div class="bgImg1"></div>
  <div class="bgImg2"></div>
  <div class="bgImg3"></div>
</body>
</html>